<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Order_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-order_id" data-rule="required"  class="form-control " name="row[order_id]" type="text" readonly="readonly"  value="{$row.order_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('退款类型')}:</label>
        <div class="col-xs-12 col-sm-8">

            {foreach name="typesList" item="vo"}
            <label for="row[types]-{$key}"><input disabled id="row[types]-{$key}" name="row[types]" type="radio" value="{$key}"   {in name="key" value="$row.types"}checked{/in} /> {$vo}</label>
            {/foreach}

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8" >
            <input id="c-user_id" data-rule="required" disabled data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" readonly="readonly" type="text" value="{$row.user_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reason" class="form-control" readonly="readonly" name="row[reason]" type="text" value="{$row.reason|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-images" disabled class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="faupload-images" disabled class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" disabled data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-images" disabled ></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline faupload-preview" disabled id="p-images"></ul>-->
<!--        </div>-->
<!--    </div>-->


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>
<!--    类型:0=爆品,1=捐增,2=兑换 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('商品类型')}:</label>
        <div class="col-xs-12 col-sm-8">


            {foreach name="typeList" item="vo"}
            <label for="row[type]-{$key}"><input disabled  id="row[type]-{$key}" name="row[type]" type="radio" value="{$key}"   {in name="key" value="$row.type"}checked{/in} /> {$vo}</label>
            {/foreach}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" class="form-control" readonly="readonly" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('退款进度')}:</label>
        <div class="col-xs-12 col-sm-8" >

            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}" ><input  class="type_type" id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}"   {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
            {/foreach}

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-desc" class="form-control" name="row[desc]" type="text" value="{$row.desc|htmlentities}">
        </div>
    </div>

    <div class="form-group" <?php if($row["status"] !=2){ echo 'display:none';}?>>
        <label class="control-label col-xs-12 col-sm-2">{:__('快递单号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-logistic_num" class="form-control" name="row[logistic_num]" type="text" value="{$row.logistic_num|htmlentities}">
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>

<style>
    .btn-trash{
        display: none!important;
    }


</style>
<script src="__CDN__/assets/js/jquery-1.11.0.js"></script>
<script>
    $(document).ready(function(){
       var types = {$row['types']};
        console.log(types)
        if(types==2){
            $("#row[status]-2").attr("style","display:none;");
        }
    });
    $(".type_type").click(function(){
        var radio=   $('.type_type:checked').val();
        console.log(radio)
        // if (radio==0){
        //     $("#row[status]-"+radio).attr("style","display:none;");//隐藏div
        //     $(".starttime").attr("style","display:none;");//隐藏div
        // }else if(radio==3){
        //     $(".endtime").attr("style","display:none;");//隐藏div
        //     $(".starttime").attr("style","display:none;");//隐藏div
        // }else {
        //     $(".endtime").attr("style","display:block;");//显示div
        //     $(".starttime").attr("style","display:block;");//显示div
        // }
    })
</script>


